﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace CATLTempUpdate
{
    public partial class FormMessageShow : Form
    {
        string message = "";
        public FormMessageShow(string msg)
        {
            InitializeComponent();
            this.Opacity = 0.65;
            message = msg;

        }

        private void FormMessageShow_Load(object sender, EventArgs e)
        {
            bgShowMsg.RunWorkerAsync();
        }


        private void bgShowMsg_DoWork(object sender, DoWorkEventArgs e)
        {
            this.Invoke(new Action(() =>
            {
                labelmsg.Text = message;
                this.labelmsg.ForeColor = Color.DodgerBlue;

            }
                        ));
            Thread.Sleep(1500);

            this.Invoke(new Action(() =>
            {
                this.Close();
            }
                        ));

        }
    }
}
